/*
 * PredictionTextFileParser.h
 *
 *  Created on: Dec 5, 2014
 *      Authors: Avihay Avitan & Stefan Farcas
 */
#include "../Pass/PassVector.h"

#include "ITextFileParser.h"
#include "../FileFormat/PredictionFileTextFormat.h"

#ifndef PREDICTIONTEXTFILEPARSER_H_
#define PREDICTIONTEXTFILEPARSER_H_

using namespace PassVectorSpace;
using namespace TextFileParserSpace;

namespace TextFileParserSpace {

/**
 * PredictionTextFileParser -  an implementation of ITextFileParser to parse a prediction text file
 */
class PredictionTextFileParser : public ITextFileParser {

public:
	PredictionTextFileParser();
	virtual ~PredictionTextFileParser();
    bool setTextFileToParse(string fileNameWithFullPath);
	bool setFileTextFormat(IFileFormat * fileFormat);
	bool parseFile();
	vector<PassVector * > getParsedPassVectors();

private:
	string tmpSatId;
	Access tmpAccess;
	SatelliteAER tmpaer;
	long tmpTimeStamp;
	bool loadParsedSatId(string line);
	bool loadParsedAccess(string line);
	bool loadParsedSatelliteAER(string line);
	bool isEndAER(string line);
	vector<PassVector * > passes;
	PredictionFileTextFormat * fileFormat;

};

} /* namespace TextFileParserSpace */

#endif /* PREDICTIONTEXTFILEPARSER_H_ */
